-- GENERATED SPELL FOR [Stormforged Construct] --


function spell0_28835(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(53167,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28835', 2000, 1)
end

function spell1_28835(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(59152,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28835', 2000, 1)
end

function spell2_28835(pUnit, Event) --@Rune Punch,n/a--
pUnit:FullCastSpellOnTarget(53068,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28835', 10256, 1)
end

function spell3_28835(pUnit, Event) --@Rune Punch,n/a--
pUnit:FullCastSpellOnTarget(59151,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28835', 10347, 1)
end

function spell4_28835(pUnit, Event) --@Runic Focus,n/a--
pUnit:FullCastSpellOnTarget(61579,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28835', 6000, 1)
end

function spell5_28835(pUnit, Event) --@Runic Focus,n/a--
pUnit:FullCastSpellOnTarget(61596,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28835', 6000, 1)
end

function Sorts_28835(pUnit, Event)
local choix_sorts_28835 = math.random(0, 5)
if choix_sorts_28835 == 0 then
pUnit:RegisterEvent('spell0_28835', 1, 1)
end
if choix_sorts_28835 == 1 then
pUnit:RegisterEvent('spell1_28835', 1, 1)
end
if choix_sorts_28835 == 2 then
pUnit:RegisterEvent('spell2_28835', 1, 1)
end
if choix_sorts_28835 == 3 then
pUnit:RegisterEvent('spell3_28835', 1, 1)
end
if choix_sorts_28835 == 4 then
pUnit:RegisterEvent('spell4_28835', 1, 1)
end
if choix_sorts_28835 == 5 then
pUnit:RegisterEvent('spell5_28835', 1, 1)
end
end

function mob28835_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28835', math.random(1500, 3000), 1)
end

function mob28835_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28835_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28835_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28835, 1, 'mob28835_Action')
RegisterUnitEvent(28835, 2, 'mob28835_Leave')
RegisterUnitEvent(28835, 3, 'mob28835_Kill')
RegisterUnitEvent(28835, 4, 'mob28835_Die')
